/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entities;

import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author stumbledog
 */
@Entity
@Table(name = "nflplayer")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Nflplayer.findAll", query = "SELECT n FROM Nflplayer n"),
    @NamedQuery(name = "Nflplayer.findById", query = "SELECT n FROM Nflplayer n WHERE n.id = :id"),
    @NamedQuery(name = "Nflplayer.findByFirstName", query = "SELECT n FROM Nflplayer n WHERE n.firstName = :firstName"),
    @NamedQuery(name = "Nflplayer.findByLastName", query = "SELECT n FROM Nflplayer n WHERE n.lastName = :lastName"),
    @NamedQuery(name = "Nflplayer.findByPosition", query = "SELECT n FROM Nflplayer n WHERE n.position = :position"),
    @NamedQuery(name = "Nflplayer.findByNumber", query = "SELECT n FROM Nflplayer n WHERE n.number = :number"),
    @NamedQuery(name = "Nflplayer.findByStatus", query = "SELECT n FROM Nflplayer n WHERE n.status = :status"),
    @NamedQuery(name = "Nflplayer.findByHeight", query = "SELECT n FROM Nflplayer n WHERE n.height = :height"),
    @NamedQuery(name = "Nflplayer.findByWeight", query = "SELECT n FROM Nflplayer n WHERE n.weight = :weight"),
    @NamedQuery(name = "Nflplayer.findByAge", query = "SELECT n FROM Nflplayer n WHERE n.age = :age"),
    @NamedQuery(name = "Nflplayer.findByBirthDate", query = "SELECT n FROM Nflplayer n WHERE n.birthDate = :birthDate"),
    @NamedQuery(name = "Nflplayer.findByCollege", query = "SELECT n FROM Nflplayer n WHERE n.college = :college"),
    @NamedQuery(name = "Nflplayer.findByExperienceYears", query = "SELECT n FROM Nflplayer n WHERE n.experienceYears = :experienceYears"),
    @NamedQuery(name = "Nflplayer.findByHighSchool", query = "SELECT n FROM Nflplayer n WHERE n.highSchool = :highSchool"),
    @NamedQuery(name = "Nflplayer.findByPhotoURL", query = "SELECT n FROM Nflplayer n WHERE n.photoURL = :photoURL"),
    @NamedQuery(name = "Nflplayer.findByActive", query = "SELECT n FROM Nflplayer n WHERE n.active = :active"),
    @NamedQuery(name = "Nflplayer.findByByeweek", query = "SELECT n FROM Nflplayer n WHERE n.byeweek = :byeweek")})
public class Nflplayer implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "id")
    private Integer id;
    @Size(max = 45)
    @Column(name = "firstName")
    private String firstName;
    @Size(max = 45)
    @Column(name = "lastName")
    private String lastName;
    @Size(max = 5)
    @Column(name = "position")
    private String position;
    @Column(name = "number")
    private Integer number;
    @Size(max = 45)
    @Column(name = "status")
    private String status;
    @Size(max = 5)
    @Column(name = "height")
    private String height;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "weight")
    private Float weight;
    @Column(name = "age")
    private Integer age;
    @Column(name = "birthDate")
    @Temporal(TemporalType.DATE)
    private Date birthDate;
    @Size(max = 45)
    @Column(name = "college")
    private String college;
    @Column(name = "experienceYears")
    private Integer experienceYears;
    @Size(max = 45)
    @Column(name = "highSchool")
    private String highSchool;
    @Size(max = 100)
    @Column(name = "photoURL")
    private String photoURL;
    @Column(name = "active")
    private Boolean active;
    @Column(name = "byeweek")
    private Integer byeweek;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "nFLPlayerid")
    private Collection<Nflweekplayer> nflweekplayerCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "playerId")
    private Collection<Fantasydraftresult> fantasydraftresultCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "playerId")
    private Collection<Nflplayergame> nflplayergameCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "playerId")
    private Collection<Fantasyrosterperweek> fantasyrosterperweekCollection;

    public Nflplayer() {
    }

    public Nflplayer(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getHeight() {
        return height;
    }

    public void setHeight(String height) {
        this.height = height;
    }

    public Float getWeight() {
        return weight;
    }

    public void setWeight(Float weight) {
        this.weight = weight;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Date getBirthDate() {
        return birthDate;
    }

    public void setBirthDate(Date birthDate) {
        this.birthDate = birthDate;
    }

    public String getCollege() {
        return college;
    }

    public void setCollege(String college) {
        this.college = college;
    }

    public Integer getExperienceYears() {
        return experienceYears;
    }

    public void setExperienceYears(Integer experienceYears) {
        this.experienceYears = experienceYears;
    }

    public String getHighSchool() {
        return highSchool;
    }

    public void setHighSchool(String highSchool) {
        this.highSchool = highSchool;
    }

    public String getPhotoURL() {
        return photoURL;
    }

    public void setPhotoURL(String photoURL) {
        this.photoURL = photoURL;
    }

    public Boolean getActive() {
        return active;
    }

    public void setActive(Boolean active) {
        this.active = active;
    }

    public Integer getByeweek() {
        return byeweek;
    }

    public void setByeweek(Integer byeweek) {
        this.byeweek = byeweek;
    }

    @XmlTransient
    public Collection<Nflweekplayer> getNflweekplayerCollection() {
        return nflweekplayerCollection;
    }

    public void setNflweekplayerCollection(Collection<Nflweekplayer> nflweekplayerCollection) {
        this.nflweekplayerCollection = nflweekplayerCollection;
    }

    @XmlTransient
    public Collection<Fantasydraftresult> getFantasydraftresultCollection() {
        return fantasydraftresultCollection;
    }

    public void setFantasydraftresultCollection(Collection<Fantasydraftresult> fantasydraftresultCollection) {
        this.fantasydraftresultCollection = fantasydraftresultCollection;
    }

    @XmlTransient
    public Collection<Nflplayergame> getNflplayergameCollection() {
        return nflplayergameCollection;
    }

    public void setNflplayergameCollection(Collection<Nflplayergame> nflplayergameCollection) {
        this.nflplayergameCollection = nflplayergameCollection;
    }

    @XmlTransient
    public Collection<Fantasyrosterperweek> getFantasyrosterperweekCollection() {
        return fantasyrosterperweekCollection;
    }

    public void setFantasyrosterperweekCollection(Collection<Fantasyrosterperweek> fantasyrosterperweekCollection) {
        this.fantasyrosterperweekCollection = fantasyrosterperweekCollection;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Nflplayer)) {
            return false;
        }
        Nflplayer other = (Nflplayer) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entities.Nflplayer[ id=" + id + " ]";
    }
    
}
